package com.zxy.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Zxy
 * @description:
 * @date: 2021-07-19 17:17
 */
@RestController
public class ProductController {

    private final Logger log = LoggerFactory.getLogger(ProductController.class);

    @Value("${server.port}")
    private int port;

    @GetMapping("/product")
    public String product(Integer id) {
        log.info("id:{}", id);
        return "product服务获取成功:" + id+",当前服务端口："+port;
    }
}
